#include "GlobalDataQueue.h"

IMPL_LOGGER(GlobalDataQueue,logger);

GlobalDataQueue::GlobalDataQueue()
{
}

GlobalDataQueue::~GlobalDataQueue()
{
}

bool GlobalDataQueue::init_queue()
{

    if(!m_client_cmd_queue)
    {
        m_client_socket_queue = CLIENTSOCKETQUEUE(new ClientSocketQueue());
    }

    if(m_client_socket_queue==NULL)
    {
        LOG4CPLUS_ERROR(logger,"init socket client queue fail");
        return false;
    }
    if(!m_client_cmd_queue)
    {
        m_client_cmd_queue = CLIENTCMDQUEUE(new ClientCmdQueue());
    }

    if(m_client_cmd_queue==NULL)
    {
        LOG4CPLUS_ERROR(logger,"init client cmd queue fail");
        return false;
    }
    
    return true;
}

